package com.cw.maintenance.action;

import java.awt.event.ActionEvent;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Vector;

import javax.swing.AbstractAction;
import javax.swing.Icon;

import com.cw.maintenance.MaintenancePanel;

public class ExportAction extends AbstractAction {
	MaintenancePanel mpanel;

	public ExportAction(String name, Icon icon, MaintenancePanel mpanel) {
		super(name, icon);
		this.mpanel = mpanel;
	}

	/**
	 * Invoked when an action occurs.
	 * 
	 * @param e
	 *            ActionEvent
	 * @todo Implement this java.awt.event.ActionListener method
	 */
	public void actionPerformed(ActionEvent e) {
//		Vector result = mpanel.getOper().getTable();
//		try {
////			PrintWriter pw = new PrintWriter(new OutputStreamWriter(
////					new FileOutputStream(SystemProperties.USER_DIR
////							+ mpanel.getOper().getSaveFile())), true);
//			PrintWriter pw = new PrintWriter(LoadAction.class
//					.getResource(mpanel.getOper().getSaveFile()).getFile());
//			
//			
//			for (int i = 0; i < result.size(); i++) {
//				pw.println(result.elementAt(i));
//			}
//		} catch (IOException ex) {
//
//		}

	}
}
